#include<stdio.h>
void mybubble(int *data,int count){
    int i,j;
    int *p,*q;
    for(i=count-1;i!=0;i--){
        p = data,q = data + 1;
        for(j=0;j!=i;++j)
        {
            if(*p>*q)
            {
                int t = *p;
                *p = *q;
                *q = t;
            }
            p++,q++;
        }
    } 
}

int main(void){
    int count,i,a[20];
    printf("How many numbers do you want to input:\n");
    scanf("%d",&count);
    printf("Please input %d numbers:\n",count);
    for(i=0;i<count;i++)
    {
        scanf("%d",&a[i]);
    } 
    mybubble(a,count);
    for(i=0;i<count;i++)
    {
        printf("%d ",a[i]);
    }
    printf("\n");
}
